package com.chencs.biz.shop.service;

import com.chencs.biz.shop.mapper.ShopMapper;
import com.chencs.vo.biz.shop.NewShopModel;
import com.chencs.vo.biz.shop.ShopModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by fangzehua on 2017/8/15.
 */

@Service
@Transactional
public class ShopService {

    @Autowired
    private ShopMapper shopMapper;

   public List<ShopModel> getShopList(){
        return  shopMapper.getShopList();
    }


    public List<NewShopModel> getNewShopList(){
        return  shopMapper.getNewShopList();
    }


    public ShopModel findShopById(String sid){
        return shopMapper.findShopById(sid);
    }

    public void insertShop(ShopModel model){
        shopMapper.insertShop(model);
    }

    public void updateShop(ShopModel model){
        shopMapper.updateShop(model);
    }

    public  void delShopById(String sid){
        shopMapper.delShopById(sid);
    }


    public void updateShopModel(NewShopModel newShopModel){
        shopMapper.updateShopModel(newShopModel);
    }

    public void addShopModel(NewShopModel shopModel){
        shopMapper.addShopModel(shopModel);
    }

    public  void delShopModel(String sid){
        shopMapper.delShopModel(sid);
    }

    public NewShopModel findNewShopModel(String sid){
        return  shopMapper.findNewShopModel(sid);
    }
}
